let isDone: boolean = false;
let num: number = 0;
let hexLiteral: number = 0xf00d;
let myName: string = 'ionluo';
let unusable: void = undefined;
// 枚举类型
enum Days {
    Sun,
    Mon,
    Tue,
    Wed,
    Thu,
    Fri,
    Sat,
}
console.log(Days["Sun"], Days[0])




// 函数有返回值情况
function alertName(name: string): string {
    return '我的名字是' + name;
}
alertName('ionluo');


// 函数无返回值情况
function alertText(): void {
    console.log('弹出文字');
}
alertText();


// 函数参数类型可能多个情况
function getString(something: string|number): string {
    return something.toString()
}
getString(0);


let body: HTMLElement = document.body

let list: NodeList = document.body.querySelectorAll('li')